package com.keti.controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.keti.Dao.stuffDao;
import com.keti.DaoImpl.suffDaoImpl;

/**
 * Servlet implementation class DeleteStuff
 */
@WebServlet("/DeleteStuff")
public class DeleteStuff extends HttpServlet {
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		int id = Integer.parseInt(request.getParameter("id"));
		stuffDao sd = new suffDaoImpl();
		sd.del(id);;
		response.sendRedirect("AdminInterfaceServlet");
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
